import request from "@/utils/request";

// 查询【请填写功能名称】列表
export function listBzjtable(query) {
  return request({
    url: "/system/bzjtable/list",
    method: "get",
    params: query,
  });
}

// 查询保证金没收列表
export function forfeitureOfDeposit(query) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/list",
    method: "get",
    params: query,
  });
}


//回执查询
export function listBzjhzList(query) {
  return request({
    url: "/system/bzjtable/hzList",
    method: "get",
    params: query,
  });
}

// 查询【请填写功能名称】详细
export function getBzjtable(XH) {
  return request({
    url: "/system/bzjtable/" + XH,
    method: "get",
  });
}

// 新增【请填写功能名称】
export function addBzjtable(data) {
  return request({
    url: "/system/bzjtable",
    method: "post",
    data: data,
  });
}
// 下载
export function downLoadFile(query) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/downLoadFile",
    method: "get",
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    params: query,
    responseType: "blob",
  });
}
// 新增没收【请填写功能名称】
export function updateMsshzt(data) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/updateMsshzt",
    method: "post",
    data: data,
  });
}

// 性质
export function addAjxzTree(data) {
  return request({
    url: "/system/caseNature/treeList",
    method: "post",
    data: data,
  });
}

// 修改【请填写功能名称】
export function updateBzjtable(data) {
  return request({
    url: "/system/bzjtable",
    method: "put",
    data: data,
  });
}

// 删除【请填写功能名称】
export function delBzjtable(XH) {
  return request({
    url: "/system/bzjtable/" + XH,
    method: "delete",
  });
}

// 审核通过
export function shSuccess(data) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/shSuccess",
    method: "post",
    data: data,
  });
}
// 审核退回
export function shBack(data) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/shBack",
    method: "post",
    data: data,
  });
}

//没收审核
export function selectMsshList(query) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/msshList",
    method: "get",
    params: query,
  });
}

//没收回执
export function selectMshzList(query) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/mshzList",
    method: "get",
    params: query,
  });
}

// 修改【请填写功能名称】
export function updateMssh(data) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/updateMsshzt",
    method: "post",
    data: data,
  });
}
// ------------------------------------
// 查询退还列表
export function backToPersonList(query) {
  return request({
    url: "/confiscate/backToPerson/list",
    method: "get",
    params: query,
  });
}
// 查询退还审核列表
export function thshList(query) {
  return request({
    url: "/confiscate/backToPerson/thshList",
    method: "get",
    params: query,
  });
}

// 查询退还回执列表
export function thhzList(query) {
  return request({
    url: "/confiscate/backToPerson/thhzList",
    method: "get",
    params: query,
  });
}
//退还提交
export function updateThshzt(data) {
  return request({
    url: "/confiscate/backToPerson/updateThshzt",
    method: "post",
    data: data,
  });
}

//退还审计通过
export function shSuccesstg(data) {
  return request({
    url: "/confiscate/backToPerson/shSuccess",
    method: "post",
    data: data,
  });
}
//退还审计不通过
export function shBackbtg(data) {
  return request({
    url: "/confiscate/backToPerson/shBack",
    method: "post",
    data: data,
  });
}


//----------------------首页
//查询金额总数
export function getAmount(query) {
  return request({
    url: "/sys/index/getAmount",
    method: "GET",
    params: query,
  });
}
export function overdueWarning(query) {
  return request({
    url: "/system/overdueWarning/list",
    method: "GET",
    params: query,
  });
}



//根据办案单位查询金额总数
export function getAmountGroupByOrg(query) {
  return request({
    url: "/sys/index/getAmountGroupByOrg",
    method: "GET",
    params: query,
  });
}

//查询没收饼图
export function getMsBing(query) {
  return request({
    url: "/sys/index/getMsBing",
    method: "GET",
    params: query,
  });
}

//查询退回饼图
export function getThBing(query) {
  return request({
    url: "/sys/index/getThBing",
    method: "GET",
    params: query,
  });
}
//查询折线图和柱状图
export function getSevenDayJe(query) {
  return request({
    url: "/sys/index/getSevenDayJe",
    method: "GET",
    params: query,
  });
}
//查询今日状态
export function getJrje(query) {
  return request({
    url: "/sys/index/getJrje",
    method: "GET",
    params: query,
  });
}
//查看附件列表
export function getFileTableList(query) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/getFileTableList",
    method: "GET",
    params: query,
  });
}
import { getToken } from '@/utils/auth'
//查看附件列表
export function uploadMsFile(query) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/uploadMsFile",
    method: "post",
    headers: {
      Authorization: "Bearer " + getToken()
    },
    responseType: 'blob', //不可省，非常重要

    data: query,
  });
}
export function getFjList(query) {
  return request({
    url: "/confiscate/forfeitureOfDeposit/fjList",
    method: "GET",
    params: query,
  });
}


//汇总查询
export function getHzReoprtList(query) {
  return request({
    url: "/system/report/sumList",
    method: "GET",
    params: query,
  });
}


//保障金查询
export function getAllBzjList(query) {
  return request({
    url: "/system/report/reportList",
    method: "GET",
    params: query,
  });
}

// 查询开户行列表
export function listBasic(query) {
  return request({
    url: '/system/basic/list',
    method: 'get',
    params: query
  })
}
// 查询案件性质列表
export function getCaseNature(query) {
  return request({
    url: '/system/caseNature/getTreeList',
    method: 'get',
    params: query
  })
}
// 新增案件性质列表
export function insertCaseNature(data) {
  return request({
    url: '/system/caseNature/insertCaseNature',
    method: 'post',
    data: data})
}
// 删除案件性质列表
export function delectCaseNature(data) {
  return request({
    url: '/system/caseNature/deleteCaseNature/'+ data,
    method: 'delete'
  })
}
// 修改案件性质列表
export function updateCaseNature(data) {
  return request({
    url: '/system/caseNature/updateCaseNature',
    method: 'put',
    data: data
  })
}